<div class="navbar navbar-default navbar-static-top" ng-controller="NavbarCtrl">
  <div class="container">
    <div class="navbar-header">
      <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="/" class="navbar-brand"><span style="font-weight:bold;color:#FF9900">学习<font style="color:#FF6600">榜</font><font style="color:#6699CC;font-size:12px">__帮学习</font></span></a>
    </div>
    <div class="navbar-collapse collapse" id="navbar-main">
      <ul class="nav navbar-nav">
        <li ng-repeat="item in menu" ng-class="{active: isActive(item.link)}">
            <a ng-href="{{item.link}}">{{item.title}}</a>
        </li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('exam')}"><a href="/exam">考试成绩查询与管理</a></li>
        <li ng-show="isRole('teacher')" ng-class="{active: isActive('article')}"><a href="/article">信息发布</a></li>
        <li ng-show="isAdmin()" ng-class="{active: isActive('admin')}"><a href="/admin">教师学生班级管理</a></li>
      </ul>

      <ul class="nav navbar-nav navbar-right">
        <!-- li ng-hide="isLoggedIn()" ng-class="{active: isActive('/signup')}"><a href="/signup">Sign up</a></li -->
        <li ng-hide="isLoggedIn()" ng-class="{active: isActive('login')}"><a href="/login">登录</a></li>
        <li ng-show="isLoggedIn()"><p class="navbar-text">你好 {{ getCurrentUser().name }}</p> </li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('settings')}"><a href="/settings"><span class="glyphicon glyphicon-cog"></span></a></li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('logout')}"><a href="" ng-click="logout()">注销</a></li>
      </ul>
    </div>
  </div>
</div>
